<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改餐品订单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ordermaster-edit" th:object="${wxOrderMaster}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单id：</label>
                <div class="col-sm-8">
                    <input name="orderId" th:field="*{orderId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">买家名字：</label>
                <div class="col-sm-8">
                    <input name="buyerName" th:field="*{buyerName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">买家电话：</label>
                <div class="col-sm-8">
                    <input name="buyerPhone" th:field="*{buyerPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">买家桌号：</label>
                <div class="col-sm-8">
                    <input name="buyerAddress" th:field="*{buyerAddress}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">买家微信openid：</label>
                <div class="col-sm-8">
                    <input name="buyerOpenid" th:field="*{buyerOpenid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单价格：</label>
                <div class="col-sm-8">
                    <input name="orderPrice" th:field="*{orderPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">就餐人数：</label>
                <div class="col-sm-8">
                    <input name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单人：</label>
                <div class="col-sm-8">
                    <input name="wxUserId" th:field="*{wxUserId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单状态, 默认为新下单：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="orderStatus" value="">
                        <label th:for="orderStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付状态, 默认未支付：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="payStatus" value="">
                        <label th:for="payStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">菜单id：</label>
                <div class="col-sm-8">
                    <input name="menuId" th:field="*{menuId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">菜单名称：</label>
                <div class="col-sm-8">
                    <input name="menuName" th:field="*{menuName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">图片地址：</label>
                <div class="col-sm-8">
                    <textarea name="menuPictureUrl" class="form-control">[[*{menuPictureUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8">
                    <input name="menuDescription" th:field="*{menuDescription}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类目名称：</label>
                <div class="col-sm-8">
                    <input name="categoryName" th:field="*{categoryName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">就餐时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="orderTime" th:value="${#dates.format(wxOrderMaster.orderTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">站点id：</label>
                <div class="col-sm-8">
                    <input name="webId" th:field="*{webId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">删除状态：</label>
                <div class="col-sm-8">
                    <input name="del" th:field="*{del}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预留字段1：</label>
                <div class="col-sm-8">
                    <input name="back1" th:field="*{back1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预留字段2：</label>
                <div class="col-sm-8">
                    <input name="back2" th:field="*{back2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预留字段3：</label>
                <div class="col-sm-8">
                    <input name="back3" th:field="*{back3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预留字段4：</label>
                <div class="col-sm-8">
                    <input name="back4" th:field="*{back4}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "wechatprogram/ordermaster";
        $("#form-ordermaster-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-ordermaster-edit').serialize());
            }
        }

        $("input[name='orderTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>